package com.tanjie.blackbean.system.admin.model.rel;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * 角色权限表
 *
 * @author tanjie
 * @since 2022-04-21
 */
@Getter
@Setter
@ToString
@TableName("sys_role_permission")
@Schema(name = "RolePermissionPO", description = "角色权限表")
public class RolePermissionPO implements Serializable {

    private static final long serialVersionUID = 1L;

    public RolePermissionPO() {
    }

    public RolePermissionPO(String roleId, String permissionId) {
        this.roleId = roleId;
        this.permissionId = permissionId;
    }

    @Schema(description = "主键id")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @Schema(description = "角色id")
    @TableField("role_id")
    private String roleId;

    @Schema(description = "资源id")
    @TableField("permission_id")
    private String permissionId;

}
